/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shop.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.List;
import com.google.common.collect.Lists;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 快递工具Entity
 * @author xxs
 * @version 2016-08-31
 */
public class ExpressTools extends DataEntity<ExpressTools> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 名称
	private String unit;		// 计量单位
	private String icon;		// 图标
	private Double firstWeight;		// 首重
	private Double defaultFirstPrice;		// 首重价格
	private Double continueWeight;		// 续重
	private Double defaultContinuePrice;		// 续重价格
	private Express defaultExpress;		// 默认快递公司
	private String description;		// 备注信息
	private List<ExpressPrice> expressPriceList = Lists.newArrayList();		// 子表列表
	
	public ExpressTools() {
		super();
	}

	public ExpressTools(String id){
		super(id);
	}

	@Length(min=1, max=255, message="名称长度必须介于 1 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=255, message="计量单位长度必须介于 0 和 255 之间")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@Length(min=0, max=1, message="图标长度必须介于 0 和 1 之间")
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}
	
	@NotNull(message="首重不能为空")
	public Double getFirstWeight() {
		return firstWeight;
	}

	public void setFirstWeight(Double firstWeight) {
		this.firstWeight = firstWeight;
	}
	
	@NotNull(message="首重价格不能为空")
	public Double getDefaultFirstPrice() {
		return defaultFirstPrice;
	}

	public void setDefaultFirstPrice(Double defaultFirstPrice) {
		this.defaultFirstPrice = defaultFirstPrice;
	}
	
	@NotNull(message="续重不能为空")
	public Double getContinueWeight() {
		return continueWeight;
	}

	public void setContinueWeight(Double continueWeight) {
		this.continueWeight = continueWeight;
	}
	
	@NotNull(message="续重价格不能为空")
	public Double getDefaultContinuePrice() {
		return defaultContinuePrice;
	}

	public void setDefaultContinuePrice(Double defaultContinuePrice) {
		this.defaultContinuePrice = defaultContinuePrice;
	}
	
	public Express getDefaultExpress() {
		return defaultExpress;
	}

	public void setDefaultExpress(Express defaultExpress) {
		this.defaultExpress = defaultExpress;
	}
	
	@Length(min=0, max=255, message="备注信息长度必须介于 0 和 255 之间")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public List<ExpressPrice> getExpressPriceList() {
		return expressPriceList;
	}

	public void setExpressPriceList(List<ExpressPrice> expressPriceList) {
		this.expressPriceList = expressPriceList;
	}
}